package org.example.seata.bs.auth.handler.check;

import org.springframework.security.authentication.BadCredentialsException;

/**
 * @author hzq
 * @date 2021/12/10 14:22
 */
public interface CheckAuthHandler {

    /**
     * 检验凭证
     *
     * @param principal   标识
     * @param credentials 凭证
     * @throws BadCredentialsException 坏的凭证
     */
    void check(String principal, String credentials) throws BadCredentialsException;

    /**
     * @return 检验类型
     */
    boolean supportType(String checkType);
}
